The present invention generally relates to flash memory control methods and apparatuses, More particularly, the present invention relates to a flash memory control method which enables updating of data at a high speed and to a flash memory control apparatus which employs such a flash memory control method.
Data processing apparatuses use disks such as magnetic disks and floppy disks as files. However, such disks are relatively heavy due to their mechanical structure, and also have a relatively large power consumption.
Accordingly, it is conceivable to use volatile semiconductor memories such as a dynamic random access memory (DRAM) and a static RAM (SRAM) as mass storage units in place of the disks. However, the volatile semiconductor memories require a backup power source such as a lithium battery, and the DRAM and the SRAM are no exception. Hence, it is conceivable to use a flash memory which has been recently developed as the mass storage unit. The flash memory requires no backup power source and is inexpensive compared to the DRAM and SRAM.
The inexpensive flash memory is a non-volatile memory and is also electrically rewritable. However, the following problems exist in the flash memory.
First, the data cannot be written unless the prestored data is once erased. However, the data erasure cannot be made one byte at a time, for example. The data erasure must be made in blocks or the data erasure must be made with respect to the entire flash memory chip. The block is a relatively large unit, and amounts to several tens of kbytes to several hundreds of kbytes.
Second, it is impossible to rewrite the data to an arbitrary address in a physical address space, because the data erasure must be made in blocks as described above. Hence, when rewriting the data, it is necessary to temporarily save the data in blocks at a certain location before making the data erasure in blocks. Then, the data which is not to be erased is written from the saved location, and the data to be newly written is thereafter written.
Third, because the rewriting of the data requires the troublesome process of temporarily saving the data and making the data erasure in blocks as described above, the write speed or the erasure speed is considerably slow compared to the read speed. In addition, because the data erasure is made in blocks which are relatively large, the rewriting of data takes an extremely long time to complete. As a result, in the case of a database which treats a large amount of data, the rewriting of data is virtually impossible.
Therefore, the flash memory has a big problem in that the rewriting of data cannot be made by an access means which uses an address similarly to the DRAM, the SRAM or the hard disk. For this reason, it is virtually impossible to use the flash memory in place of the DRAM, SRAM, the hard disk or the like. However, because the flash memory requires no backup power source and is inexpensive, there are demands to put the advantageous features of the flash memory in use.